#include "TcpServer.hpp"

void Usage(const std::string& proc)
{
    std::cout<<"Usage:\n\t"<<proc<<" serverport"<<std::endl;
}

//./tcp_server serverport
int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(Usage_Err);
    }

    int16_t port=std::stoi(argv[1]);
    std::unique_ptr<TcpServer> tsver =std::make_unique<TcpServer>(port);

    tsver->Init();
    tsver->Start();
    return 0;
}